projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e40f4f
)
Make gtk_test_init work without assertions
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 13 Apr 2021 00:57:02 +0000
(20:57 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 13 Apr 2021 01:22:46 +0000
(21:22 -0400)
The g_test_init macro 'helpfully' refuses to work when
assertions are disabled. So we just use the function.
gtk/gtktestutils.c
patch
|
blob
|
history
diff --git
a/gtk/gtktestutils.c
b/gtk/gtktestutils.c
index 854e74fe6f953f2c3a498c93ef5d6ccfcb8511ab..6bcd1192c4b7255c69b31c93ce5c53e760c99419 100644
(file)
--- a/
gtk/gtktestutils.c
+++ b/
gtk/gtktestutils.c
@@
-80,7
+80,10
@@
gtk_test_init (int *argcp,
char ***argvp,
...)
{
- g_test_init (argcp, argvp, NULL);
+ /* g_test_init is defined as a macro that aborts if assertions
+ * are disabled. We don't want that, so we call the function.
+ */
+ (g_test_init) (argcp, argvp, NULL);
gtk_disable_setlocale();
setlocale (LC_ALL, "en_US.UTF-8");